package com.tianhui.consignortwofei.manager;


import com.fgs.common.other.CommonEvent;
import com.tianhui.consignortwofei.other.EventWhat;

import org.greenrobot.eventbus.EventBus;

/**
 * @author fgs
 * @date 2020/3/27
 **/
public class EventBusManage {

    /**
     * 刷新货主信息
     */
    public static void refreshConsignorInfo() {
        EventBus.getDefault().post(new CommonEvent(EventWhat.EVENT_REFRESH_CONSIGNOR_INFO.getValue()));
    }

    /**
     * 刷新消息红点
     */
    public static void refreshMessagePoint(String number) {
        EventBus.getDefault().post(new CommonEvent(EventWhat.EVENT_REFRESH_MESSAGE_POINT.getValue(), number));
    }

    /**
     * 刷新订单详情
     */
    public static void refreshOrderDetail() {
        EventBus.getDefault().post(new CommonEvent(EventWhat.EVENT_REFRESH_ORDER_DETAIL.getValue()));
    }

    /**
     * 刷新订单操作
     */
    public static void refreshOrderOperate() {
        EventBus.getDefault().post(new CommonEvent(EventWhat.EVENT_REFRESH_ORDER_OPERATE.getValue()));
    }

    /**
     * 刷新订单列表
     */
    public static void refreshOrderList() {
        EventBus.getDefault().post(new CommonEvent(EventWhat.EVENT_REFRESH_ORDER_LIST.getValue()));
    }

    /**
     * 刷新司机列表
     */
    public static void refreshDriverList() {
        EventBus.getDefault().post(new CommonEvent(EventWhat.EVENT_REFRESH_DRIVER_LIST.getValue()));
    }

    /**
     * 刷新车辆列表
     */
    public static void refreshVehicleList() {
        EventBus.getDefault().post(new CommonEvent(EventWhat.EVENT_REFRESH_VEHICLE_LIST.getValue()));
    }

    public static void activityFinish() {
        EventBus.getDefault().post(new CommonEvent(EventWhat.EVENT_ACTIVITY_FINISH.getValue()));
    }

    public static void operateActivityFinish() {
        EventBus.getDefault().post(new CommonEvent(EventWhat.EVENT_OPERATE_ACTIVITY_FINISH.getValue()));
    }

    public static void refreshLoginStatus() {
        EventBus.getDefault().post(new CommonEvent(EventWhat.EVENT_LOGIN_STATUS.getValue()));
    }

    public static void refreshCarrierList() {
        EventBus.getDefault().post(new CommonEvent(EventWhat.EVENT_REFRESH_CARRIER_LIST.getValue()));
    }

    public static void refreshStatisticsView() {
        EventBus.getDefault().post(new CommonEvent(EventWhat.EVENT_REFRESH_STATISTICS_VIEW.getValue()));
    }

    public static void refreshCarrierManageView() {
        EventBus.getDefault().post(new CommonEvent(EventWhat.EVENT_REFRESH_CARRIER_MANAGE_VIEW.getValue()));
    }

    public static void refreshPhone(String phone) {
        EventBus.getDefault().post(new CommonEvent(EventWhat.EVENT_REFRESH_PHONE.getValue(), phone));
    }


    /**
     * 去运单页面
     */
    public static void goYunDan() {
        EventBus.getDefault().post(new CommonEvent(EventWhat.EVENT_MOVE_TO_YUNDAN.getValue()));
    }


    /**
     * 刷新报价列表
     */
    public static void refreshBaoJiaList() {
        EventBus.getDefault().post(new CommonEvent(EventWhat.EVENT_REFRESH_BAOJIA_LIST.getValue()));
    }


    public static void refreshContractList() {
        EventBus.getDefault().post(new CommonEvent(EventWhat.EVENT_REFRESH_CONTRACT_LIST.getValue()));
    }


}
